package org.xiji.interfaceFactory;

/**
 * 抽象工厂 模式测试类
 */

public class interfaceFactoryMain {

    public static void main(String[] args) {
        System.out.println("创建My工厂");
        MyFactory myFactory = new MyFactory();
        System.out.println("获取My篮球游戏");
        Game myBasketBallGame = myFactory.getGame();
        myBasketBallGame.getGame();
        System.out.println("获取My红烧鱼");
        Food myBraisedFishInBrownSauce = myFactory.getFood();
        myBraisedFishInBrownSauce.getFood();
        System.out.println("----------------------------------------");

        System.out.println("创建XiJi工厂");

        XiJiFactory xiJiFactory = new XiJiFactory();
        System.out.println("获取XiJi篮球游戏");

        Game xiJiBasketBallGame = xiJiFactory.getGame();
        xiJiBasketBallGame.getGame();
        System.out.println("获取XiJi红烧鱼");
        Food xiJiBraisedFishInBrownSauce = xiJiFactory.getFood();
        xiJiBraisedFishInBrownSauce.getFood();
    }
}
